
// let date = new Date('2020/10/10 23:59:59')

// setInterval(()=>{
//     // console.log(typeof date);
//     var current = date.getTime() - 1000
//     // if(current>){
//     //     cl
//     // }
//     date =  new Date(current)
//     console.log(date.toLocaleString());
// },1000)



let students = ['吴浩','王豪','齐心怡','杨湾镇','杨彤','苏佳文','王登科','闫龙强']

function getName(){
    let random = Math.random()*students.length
    let zsRandom = Math.floor(random)
    // let name = students[zsRandom]
    let name = students.splice(zsRandom,1)
    return name
}


timer = setInterval(()=>{
    // console.log(students[Math.floor(Math.random()*students.length)]);
    let arr = getName()
    // console.log(arr.length);
    if(arr.length<=0){
        clearInterval(timer)
    }else{
        console.log(arr[0]);
    }
  
},1000)



